﻿#ifndef REMINDER_H
#define REMINDER_H

#include <QSqlDatabase>
#include <QSqlQuery>

#include "support/sp_env.h"
#include "timer.h"
#include "m_fhs.h"

class Reminder : public QObject
{
    Q_OBJECT
public:
    explicit Reminder(QObject *parent,const QSqlDatabase &db);

    void generateSchema();
    void timerRaise(const QString &uid);
    void cleanUp();

signals:
    void raise(const QString &detail);

private:
    QSqlDatabase _db;
    QHash<QString,QTimer*> timers;
};

#endif // REMINDER_H
